import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

//https://book.flutterchina.club/chapter7/theme.html#_7-4-1-%E9%A2%9C%E8%89%B2
// ThemeData用于保存是Material 组件库的主题数据，Material组件需要遵守相应的设计规范，而这些规范可自定义部分都定义在ThemeData中了，
// 所以我们可以通过ThemeData来自定义应用主题。在子组件中，我们可以通过Theme.of方法来获取当前的ThemeData。
//注意：Material Design 设计规范中有些是不能自定义的，如导航栏高度，ThemeData只包含了可自定义部分。
// Brightness? brightness, //深色还是浅色
//     MaterialColor? primarySwatch, //主题颜色样本，见下面介绍
// Color? primaryColor, //主色，决定导航栏颜色
//     Color? cardColor, //卡片颜色
// Color? dividerColor, //分割线颜色
//     ButtonThemeData buttonTheme, //按钮主题
// Color dialogBackgroundColor,//对话框背景颜色
//     String fontFamily, //文字字体
// TextTheme textTheme,// 字体主题，包括标题、body等文字样式
//     IconThemeData iconTheme, // Icon的默认样式
// TargetPlatform platform, //指定平台，应用特定平台控件风格
//     ColorScheme? colorScheme,

final ThemeData lightTheme = ThemeData(
  brightness: Brightness.light,
  scaffoldBackgroundColor: Colors.blue,
  primaryColor: Colors.blue,
  hintColor: Colors.blueAccent,
);

final ThemeData darkTheme = ThemeData(
  brightness: Brightness.dark,
  scaffoldBackgroundColor: Colors.black,
  primaryColor: Colors.black,
  hintColor: Colors.blueGrey,
);

final ThemeData greenTheme = ThemeData(
  brightness: Brightness.light,
  scaffoldBackgroundColor: Colors.green,
  primaryColor: Colors.green,
  hintColor: Colors.greenAccent,
);

final ThemeData orangeTheme = ThemeData(
  brightness: Brightness.light,
  scaffoldBackgroundColor: Colors.orange,
  primaryColor: Colors.orange,
  hintColor: Colors.orangeAccent,
);

final ThemeData purpleTheme = ThemeData(
  brightness: Brightness.light,
  scaffoldBackgroundColor: Colors.purple,
  primaryColor: Colors.purple,
  hintColor: Colors.purpleAccent,
);

final ThemeData pinkTheme = ThemeData(
  brightness: Brightness.light,
  scaffoldBackgroundColor: Colors.pink,
  primaryColor: Colors.pink,
  hintColor: Colors.pinkAccent,
);

final ThemeData tealTheme = ThemeData(
  brightness: Brightness.light,
  scaffoldBackgroundColor: Colors.teal,
  primaryColor: Colors.teal,
  hintColor: Colors.tealAccent,
);

//参考 from ： https://github.com/lilongweidev/study_language_theme.git
///浅色模式
// ThemeData lightTheme = ThemeData.light().copyWith(
//   primaryColor: Colors.blue,
//   splashColor: Colors.white12,
//   appBarTheme: AppBarTheme(
//     systemOverlayStyle: SystemUiOverlayStyle.dark,
//     elevation: 0,
//     backgroundColor: ThemeData.light().scaffoldBackgroundColor,
//     iconTheme: const IconThemeData(color: Colors.black),
//   ),
//   dividerColor: Colors.white38,
//   scaffoldBackgroundColor: ThemeData.light().scaffoldBackgroundColor,
//   // backgroundColor: Colors.white,
//   iconTheme: const IconThemeData(
//     color: Colors.black,
//   ),
//   bottomNavigationBarTheme: const BottomNavigationBarThemeData(
//       selectedItemColor: Colors.black,
//       unselectedItemColor: Colors.grey
//   ),
// );
//
// ///深色模式
// ThemeData darkTheme = ThemeData.dark().copyWith(
//   appBarTheme: AppBarTheme(
//     systemOverlayStyle: SystemUiOverlayStyle.light,
//     elevation: 0,
//     backgroundColor: ThemeData.dark().scaffoldBackgroundColor,
//     iconTheme: const IconThemeData(color: Colors.white),
//   ),
//   dividerColor: Colors.black38,
//   scaffoldBackgroundColor: ThemeData.dark().scaffoldBackgroundColor,
//   // backgroundColor: Colors.black,
//   iconTheme: const IconThemeData(
//     color: Colors.white,
//   ),
//   bottomNavigationBarTheme: const BottomNavigationBarThemeData(
//       selectedItemColor: Colors.white,
//       unselectedItemColor: Colors.white24
//   ),
// );
